//
//  PCDRightDropView.h
//  AresOpenPlatformSDK
//
//  Created by 刘明飞 on 2020/9/16.
//  Copyright © 2020 P&C. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, PCDDropType) {
    PCDDropTypeNormal,  //图片在左, 文字在右
    PCDDropTypeTitle,   //只有文字
};

typedef void (^ItemHandler) (NSInteger index);

@interface PCDRightDropView : UIView

@property (nonatomic, assign) CGFloat opacity;

//文字颜色
@property (nonatomic, strong) UIColor *titleColor;

//线条颜色
@property (nonatomic, strong) UIColor *lineColor;

//箭头x偏移值
@property (nonatomic, assign) CGFloat arrowOffset;

//布局类型 (图片再左, 文字在右)
@property (nonatomic, assign) PCDDropType type;

//箭头的颜色(UIColor类型)
@property (nonatomic, strong) UIColor *arrowColor;

//箭头的颜色(16进制类型, 传16进制值即可, 例 #ffffff)
@property (nonatomic, copy) NSString *arrowColor16;

@property (nonatomic, copy) ItemHandler selectHandler;

+ (instancetype)showWithTitleArr:(NSArray *)titleArr ImageArr:(NSArray *)imageArr type:(PCDDropType)type handler:(ItemHandler)selectHandler;

/**
 移除下拉View
 */
- (void)removeDropView;

@end

@class PCDDropModel;
@interface PCDDropCell : UITableViewCell

+ (instancetype)dropMenuCellWithTableView:(UITableView *)tableView;

/** 数据模型 */
@property (nonatomic, strong) PCDDropModel *model;
/** 图片 */
@property (nonatomic, strong) UIImageView *imageIV;
/** 标题 */
@property (nonatomic, strong) UILabel *titleL;
/** 线条 */
@property (nonatomic, strong) UIImageView *line;

@end

@interface PCDDropModel : NSObject

@property (nonatomic, copy) NSString *image;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, assign) PCDDropType type;

- (instancetype)initWithDictonary:(NSDictionary *)dict;

+ (instancetype)dropMenuWithDictonary:(NSDictionary *)dict;

@end

